﻿using System.Threading.Tasks;
using ServiceStack.Redis;

namespace BASIC_CORE.Domain.Caching.DBContext
{
    /// <summary>
    /// 
    /// </summary>
    public interface IRedisDbContext
    {
        /// <summary>
        /// 获取Redis客户端连接对象，有连接池管理。
        /// </summary>
        /// <param name="isReadOnly">是否取只读连接。Get操作一般是读，Set操作一般是写</param>
        /// <returns></returns>
        Task<RedisClient> GetRedisClient(bool isReadOnly = true);
    }
}
